package SO;
import java.util.Scanner;
import java.util.Arrays;
public class Main {
	 public static void main(String[] args){ 
		 Scanner sc = new Scanner(System.in);
		 while(true){
		 int n = sc.nextInt();
		 String[][] str = getDynamicMatrix(n);
			for(int i = 1;i<n+1;i++){
				for(int j = 1;j<i+1;j++){
					str[i-1][j-1] =i + "*" + j + "=" + i*j ;
					if (j == i)
						System.out.printf("%s", str[i-1][j-1]);
					else
						System.out.printf("%-7s", str[i-1][j-1]);
				}
					System.out.println();
				}
			System.out.println(Arrays.deepToString(str));
}
	 }
	private static String[][] getDynamicMatrix(int n) {
		String[][] strs = new String[n][];
		for(int i = 0;i<n;i++){
			strs[i] = new String[i+1];
		}
		return strs;
		
	}
} 
